home *** CD-ROM | disk | FTP | other *** search
- Path: news.crd.ge.com!usenet
- From: kornfein@unconfigured.xvnews.domain (Mark Kornfein)
- Newsgroups: comp.lang.c++
- Subject: Static creator methods
- Date: 3 Jan 1996 15:15:40 GMT
- Organization: The unconfigured xvnews people
- Message-ID: <4ce6is$gpp@rdsunx.crd.ge.com>
- Reply-To: kornfein@unconfigured.xvnews.domain
- NNTP-Posting-Host: cruncher.crd.ge.com
-
- I have some code that I inherited that uses static creator methods (functions) to
- create new instances of a class. Anotherwords the "new ClassConstructor" is called
- from a static method instead of directly.
-
- I assumed that this was done because the original coder did not understand C++.
- Now I read a manual for a class library that recommends always using these,
- but does not say why.
-
- What are the advantages/disadvantages of encapsulating the instantiation of
- objects this way?
-
- --
- ===============================================================================
- Mark Kornfein INET: kornfein@crd.ge.com
- GE Corporate Research & Development Phone: (518) 387-5843
- One Research Circle, K1-5B36, Schenectady, NY 12301
-
-
-